package fr.utbm.gi.vi51.project.agent;

import org.janusproject.kernel.agent.Kernels;

import fr.utbm.gi.vi51.framework.FrameworkLauncher;
import fr.utbm.gi.vi51.framework.environment.Environment;
import fr.utbm.gi.vi51.project.agent.body.MutaliskBody;
import fr.utbm.gi.vi51.project.agent.body.UnitBody;

public class Mutalisk extends Enemy {

	private static final long serialVersionUID = -8417250901904862078L;

	@Override
	protected MutaliskBody createBody(Environment in) {
		return new MutaliskBody(getAddress());
	}

	@Override
	protected void attack(UnitBody unitBody) {
		MutaliskMissile missile = new MutaliskMissile(unitBody);
		FrameworkLauncher.launchAgent(missile, getPosition().getX(), getPosition().getY());
		Kernels.get().launchLightAgent(missile);
		this.cooldown = getBody().getAttackCooldown();
	}

}
